package com.java.demo11;

public class Test {
    public static void main(String[] args) {
        //编译看左边，执行看右边
        JumpInterface cat = new Cat("咪咪", 2);
        cat.jump();
        System.out.println("----------------------------");
        Animal cat1 = new Cat("梨花",3);
        cat1.jump();
        cat1.eat();

        System.out.println("----------------------------");
        Animal dog = new Dog();
        dog.setName("1111");
        dog.setAge(1);
        System.out.println(dog);
        dog.jump();
        dog.eat();

    }
}
